<template>
	<view>
		<view>
			<!-- 分段器区域 -->
			<view>
				<view class="cates_title">
					<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text"></uni-segmented-control>
					<view class="fenge"></view>
					<view class="box001">
						<view class="dodo">
							<uni-collapse accordion="true" class="collapse">
							    <uni-collapse-item title="系列">
							        <view class="box01">
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
									</view>
							    </uni-collapse-item>
							</uni-collapse>
						</view>
					</view>
					<view class="box001">
						<view class="dodo">
							<uni-collapse accordion="true" class="collapse">
							    <uni-collapse-item title="舞种">
							        <view class="box01">
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
										<view style="padding: 30rpx;">
										    恰恰
										</view>
									</view>
							    </uni-collapse-item>
							</uni-collapse>
						</view>
					</view>
				</view>
				<view class="music_cates">
					<view>
						<image src="../../static/shouc.png" mode=""></image>
						<text>收藏</text>
					</view>
					<view>
						<image src="../../static/zuij.png" mode=""></image>
						<text>最近</text>
					</view>
					<view @click="toGeDan">
						<image src="../../static/gedan.png" mode=""></image>
						<text>歌单</text>
					</view>
				</view>
				<view class="content">
					<view v-show="current === 0">
						<view class="gedan">
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text class="qia">恰恰歌曲大合集</text>
								<view class="eyes">
									<view class="eye">378</view>
								</view>
							</view>
						</view>
					</view>
					<view v-show="current === 1">
						<view class="gedan">
							<view>
								<image src="../../static/gedan.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
						</view>
					</view>
					<view v-show="current === 2">
						<view class="gedan">
							<view>
								<image src="../../static/qia.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
							<view>
								<image src="../../static/logo.png"></image>
								<text>恰恰歌曲大合集</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
	import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
	import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
	export default {
		components: {
			uniSegmentedControl,uniCollapse,uniCollapseItem
		},
		data() {
			return {
				items: ['最新', '推荐', '热门'],
				current: 0
			}
		},
		methods: {
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex;
				}
			}
		}
	}
</script>

<style lang="scss">
	.cates_title {
		display: flex;
		justify-content: space-around;
		align-items: center;
		position: relative;
		padding: 0 20rpx;
		.segmented-control__item {
			padding: 0 20rpx;
			margin: 0 10rpx;
		}
		.fenge {
			width:4rpx;
			height:28rpx;
			background:rgba(203,208,215,1);
			border-radius:2rpx;
		}
		.box001 {
			width: 120rpx;
			height: 88rpx;
			.dodo {
				position: absolute;
				top: 0;
				z-index: 999;
				.uni-collapse-cell.data-v-36b8b042 {
					border-bottom: 0;
				}
				.box01 view {
					border-bottom: 1px solid #ccc;
					&:nth-child(1) {
						border-top: 1px solid #ccc;
					}
				}
				
			}
		}
	}
	.music_cates {
		display: flex;
		justify-content: space-around;
		margin: 40rpx 0;
		view {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			image {
				width: 92rpx;
				height: 92rpx;
				margin-bottom: 16rpx;
			}
			text {
				width:52rpx;
				height:36rpx;
				font-size:26rpx;
				font-family:PingFangSC-Regular,PingFang SC;
				font-weight:400;
				color:rgba(51,51,51,1);
				line-height:36rpx;
			}
		}
	}
	.content {
		margin-top: 20rpx;

		.gedan {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-around;
			align-items: center;

			view {
				display: flex;
				flex-direction: column;
				position: relative;
				image {
					width:328rpx;
					height:206rpx;
				}
				.qia {
					width: 196rpx;
					height: 40rpx;
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: rgba(51, 51, 51, 1);
					line-height: 40rpx;
					margin: 12rpx 0 30rpx 0;
				}
				.eyes {
					position: absolute;
					top: 10rpx;
					right: 10rpx;
					width: 80rpx;
					.eye {
						display: flex;
						align-items: center;
						display: inline-block;
						width:80rpx;
						height:32rpx;
						font-size:22rpx;
						font-family:PingFangSC-Medium,PingFang SC;
						font-weight:500;
						color:rgba(255,255,255,1);
						line-height:32rpx;
						&::before {
							content: ""; // 必须要加
							display: inline-block;  // 必须加，改变其元素分类，让我们可以设置其宽高
							width:20rpx;
							height:20rpx;
							background: rgba(203,208,215,1) url(../../static/sousu.png) no-repeat;
							background-size:cover; // 背景图片的大小需要在背景图片后面添加，在前面加无效
							margin: 0 6rpx;
						}
					}
				}
			}
		}
	}
</style>
